﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;

namespace Test.表达式目录树.简介
{
    public class 表达式树
    {
        Expression<Func<int, int, int>> add = (x, y) => x + y;
       public void 加法表达式树()
        {
            ParameterExpression x = Expression.Parameter(typeof(int), "x");
            ParameterExpression y = Expression.Parameter(typeof(int), "y");
            Expression<Func<int, int, int>> add = Expression.Lambda<Func<int, int, int>>(Expression.Add(
                    x, // left  
                    y // right  
                ),new ParameterExpression[] { x, y });

        }
    }
}
